   document.addEventListener("plusready", function() {
        // 注册返回按键事件
        plus.key.addEventListener('backbutton', function() {
            window.history.back();
        }, false);
        //此处false代表不退出页面，如果为true回退到上一个一面
    });




$(function(){


$(".autograph").click(function(){
		var token = localStorage.phone;
		var content = $(".content").val();
		if(content==''){
			layer.msg("请输入你的个性签名");
			return false;
		}
		$.ajax({
			url:"https://newapp.icandrive.cn/api/autograph.php",
			type:'post',
			dataType:'json',
			data:{token:token,content:content},
			success:function(data){
				if(data.status==250){
					layer.msg(data.msg);
					setInterval(function(){
						window.location,href="../login/log_in.html";

					},2000);
				}
				if(data.status==200){
					layer.msg(data.msg);
					setInterval(function(){
						window.location.href="../coach-I/coach-me.html";
					},2000);
				}
				if(data.status==400){
					layer.msg(data.msg);
				}
			},
			error:function(){
				 layer.msg('系统繁忙',function(){
                                history.go(0)
                            },1000);
			}
		});
	});


    })
